import numpy as np
import random
import time

class generator:
    def __init__(self, num = 5, length = 100, begin = 0, step = 50) ->None:
        self.array1 = []
        self.array = []
        self.num = num
        self.length = length
        for i in range(num):
            array1 = []
            for i in range(length):
                temp = np.random.randint(begin , begin+step)
                array1.append(temp)
                begin = np.random.choice(array1)
            array = [i for i in array1]
            np.random.shuffle(array)
            seeds = int(time.time())
            np.random.seed(seeds)
            self.array.append(array)
            begin = np.random.choice(array1)
    def __str__(self) -> str:
        test_str = "Test set is:\n"
        for i in range(self.num):
            test_str += str(self.array[i]) + '\n'
        return test_str

    def __getitem__(self, index):
        return self.array[index]


if __name__ == "__main__":
    temp = [20,30,40]
    b = generator(length=temp[0])
    for i in range(len(temp)):
        b = generator(length=temp[0])
    print(type(b))